Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypedPropertyFromAssignsRector] Handle parse_url() native function with second arg on TypedPropertyFromAssignsRector #6562

Merged
merged 10 commits into from
Dec 12, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik marked this pull request as draft December 12, 2024 00:28
@samsonasik samsonasik marked this pull request as ready for review December 12, 2024 00:43
@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @yguedidi

this is based on phpstan https://phpstan.org/r/09bc2166-3fc2-4f92-88f4-35e2e51d9e08

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 4579273 into main Dec 12, 2024
41 checks passed
@samsonasik samsonasik deleted the native-function-return branch December 12, 2024 00:46
@yguedidi
Copy link
Contributor

Impressive!! So efficient, thank you @samsonasik ! 👍

@samsonasik
Copy link
Member Author

@yguedidi it seems cause a bug when default value is part of the union, eg:

    private $host = true;

it cause invalid result:

    private string|false|null $host = null;

I will check if that possible to handle on new PR:

otherwise, I will just use bool over false as today is release day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behavior of TypedPropertyFromAssignsRector
2 participants